//
//  HomeViewController.h
//  RegBars
//
//  Created by Huu Nhat on 7/26/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RestaurantParser.h"
#import "ImageDownloader.h"
#import <MapKit/MapKit.h>
#import "MyLocationParser.h"

@class HomeCell;

@interface HomeViewController : UIViewController <RestaurantParserDelegate, ImageDownloaderDelegate, CLLocationManagerDelegate, MyLocationParserDelegate, UIScrollViewDelegate>{
    CLLocationManager *locationManager;
	CLLocation *currentLocation;
	UITableView *homeTable;
    UIView *titleView;
    UIView *leftView;
    UIView *centerView;
    UIView *rightView;
    UIImageView *titleBarBackground;
    UILabel *specialTitleLabel;
    UIButton *previousButton;
    UIButton *nextButton;
    HomeCell *homeCell;
    NSMutableArray *viewArrays;
    UIView *loadingView;
	NSMutableArray *currentRestaurantList;
	NSMutableDictionary *mondayDownloadsInProgress;
	NSMutableString *myAddress;
    IBOutlet UIScrollView *titleScrollView;
    int currentPage, newPage;
    BOOL byScroll;
}

@property (nonatomic, retain) NSMutableString *myAddress;
@property (nonatomic, retain) CLLocation *currentLocation;
@property (nonatomic, retain) NSMutableDictionary *mondayDownloadsInProgress;
@property (nonatomic, retain) IBOutlet UITableView *homeTable;
@property (nonatomic, retain) IBOutlet UIView *titleView;
@property (nonatomic, retain) IBOutlet UIView *leftView;
@property (nonatomic, retain) IBOutlet UIView *centerView;
@property (nonatomic, retain) IBOutlet UIView *rightView;
@property (nonatomic, retain) IBOutlet UIImageView *titleBarBackground;
@property (nonatomic, retain) IBOutlet UILabel *specialTitleLabel;
@property (nonatomic, retain) IBOutlet UIButton *previousButton;
@property (nonatomic, retain) IBOutlet UIButton *nextButton;
@property (nonatomic, assign) IBOutlet HomeCell *homeCell;
@property (nonatomic, retain) IBOutlet UIView *loadingView;

- (IBAction)previousButtonPress;
- (IBAction)nextButtonPress;
- (void) showPreviosView;
- (void) showNextView;
- (void) layout;
- (void) updateLeft;
- (void) updateRight;
- (void)startIconDownload:(Restaurant*)restaurant forIndexPath:(NSIndexPath *)indexPath;
- (void) loadRestaurant;
- (IBAction)backToCity:(id)sender;

@end
